package amushen.two.html.impl;

import amushen.two.html.BaseComponent;

public class Button extends BaseComponent {

	public String getTagName() {		
		return "INPUT";
	}
	private boolean isSubmit=false;
	
	public Button() {
		getProperties().put("type", "button");
		getProperties().put("value", "");
		setClassName("button");
	}
	public String getValue() {
		return (String)getProperties().get("value");
	}

	public void setValue(String value) {
		getProperties().put("value", value);
	}

	public String getName() {
		return this.getId();
	}

	public void setName(String name) {
		this.setId(name);
	}
	public boolean isSubmit() {
		return isSubmit;
	}
	public void setSubmit(boolean isSubmit) {		
		this.isSubmit = isSubmit;
		if(isSubmit)
			getProperties().put("type", "submit");
		else
			getProperties().put("type", "button");
	}
	
}
